#import sqlite3 as dbapi
#con = dbapi.connect('test1.db')
import MySQLdb as dbapi
con = dbapi.connect('localhost', 'root','a', 'test1')

cur = con.cursor()
cur.execute('drop table t1;')
cur.execute('CREATE TABLE t1(no int, name varchar(100));')
cur.execute('INSERT INTO t1 VALUES(111, "david");')
con.commit()

cur.execute('select * from t1' )
print(cur.fetchall())
